package cn.com.lyj6851.modules.activity.controller;

import cn.com.lyj6851.logging.aop.AopLog;
import cn.com.lyj6851.modules.activity.service.YdyStorePinkService;
import cn.com.lyj6851.modules.activity.service.dto.YdyStorePinkQueryCriteria;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 
*/
@Api(tags = "商城:拼团记录管理")
@RestController
@RequestMapping("api")
public class StorePinkController {

    private final YdyStorePinkService yxStorePinkService;

    public StorePinkController(YdyStorePinkService yxStorePinkService) {
        this.yxStorePinkService = yxStorePinkService;
    }

    @AopLog("查询记录")
    @ApiOperation(value = "查询记录")
    @GetMapping(value = "/ydyStorePink")
    @PreAuthorize("@el.check('admin','STOREPINK_ALL','STOREPINK_SELECT')")
    public ResponseEntity getYdyStorePinks(YdyStorePinkQueryCriteria criteria, Pageable pageable){
        return new ResponseEntity<>(yxStorePinkService.queryAll(criteria,pageable),HttpStatus.OK);
    }


}